package algutil.partagemusic.filter;

import java.io.File;
import java.io.FileFilter;

import algutil.partagemusic.option.Options;


public class PartageDirectoryFilter implements FileFilter {

	private static String currentUser;

	static {
		currentUser = Options.getInstance().whoAmI();
	}

	public boolean accept(File pathname) {

		if (pathname.isDirectory()
				&& pathname.getName().startsWith("partage_")
				&& !pathname.getName().equalsIgnoreCase(
						"partage_" + currentUser)) {
			return true;
		}
		return false;
	}
}
